package com.kaifamiao.www.Thread.do0927;

public class CookTest {
    public static void main(String[] args) throws InterruptedException {
        Cook cook = Cook.getInstance();
        MakeThread make = new MakeThread(cook);
        EatThread eat1 = new EatThread(cook, "一号");
        EatThread eat2 = new EatThread(cook,"二号");
        make.start();
        eat1.start();
        eat2.start();

        while (true){
            System.out.println("make="+make.getState()+ ",eat1="+eat1.getState()+",eat2+"+eat2.getState());
            Thread.sleep(1000);
        }
    }
}
